package asava.trees;

import java.util.List;

/**
 * @author Tim Richter
 */
public final class Try extends Tree {
    public Tree body;
    public List<Tree> catches;
    public Tree finalizer;

    public Try(final Tree body,
               final List<Tree> catches,
               final Tree finalizer) {
        this.body = body;
        this.catches = catches;
        this.finalizer = finalizer;
    }

    @Override
    public int kind() {
        return TreeKind.TRY;
    }

    @Override
    public void accept(final TreeVisitor visitor) {
        visitor.visit(this);
    }
}
